d7ab38389afaa357f0a306795fc4af39ca03c989,src/edu/stanford/nlp/parser/shiftreduce/BasicFeatureFactory.java,BasicFeatureFactory,addUnaryQueueFeatures,#List#CoreLabel#String#,182
Before Change
}
public static void addUnaryQueueFeatures(List<String> features, CoreLabel label, String wtFeature) {
if (label == null) {
features.add(wtFeature + NULL);
return;
}
String tag = label.get(TreeCoreAnnotations.HeadTagAnnotation.class).label().value();
String word = label.get(TreeCoreAnnotations.HeadWordAnnotation.class).label().value();
// TODO: check to see if this is slow because of the string concat
features.add(wtFeature + tag + "-" + word);
After Change
}
public static void addUnaryQueueFeatures(List<String> features, CoreLabel label, String wtFeature) {
String tag = (label == null) ? NULL : label.get(TreeCoreAnnotations.HeadTagAnnotation.class).label().value();
String word = (label == null) ? NULL : label.get(TreeCoreAnnotations.HeadWordAnnotation.class).label().value();
// TODO: check to see if this is slow because of the string concat
features.add(wtFeature + tag + "-" + word);